import api from '@/api';
import store from '@/store';
export const useSearchHistory = () => {
    const saveHistory = async (val) => {
        const { success } = await api.queryHistoryModel.save({
            empId: store.getters.userInfo.employeeDTO.empId,
            name: val,
            tenantId: 'teep-pmp'
        });
        if (success) {
            //获取用户搜索历史
            store.dispatch('user/GetSearchHistoryRecord');
        }
    };
    return {
        saveHistory
    };
};